﻿
namespace Huirui.Cavan.Presentation.Seedwork
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics.Contracts;
    using System.Linq;
    using Huirui.Cavan.Core.Persistent;

    public interface IEditModel<T, TID, TSearch> : IEntityModel<T, TID, TSearch>
        where T : class, IPersistentObject
        where TSearch : class, ISearch<TID>
    {
        /// <summary>
        ///     Current Entity Item used on Detail, New and Edit
        /// </summary>
        new T Item { get; set; }

        /// <summary>
        ///     Searching Object for Entity Item. 
        ///     (In Dao should be casted to EntitySearch to provide access to all properties)
        /// </summary>
        new TSearch SearchParam { get; set; }
    }
}